export const supplierFormData = {
	tenantId: null,
	socialCreditCode: null,
	supplierName: null,
	abbreviation: null,
	supplierCode: null,
	supplierCreator: null,
	supplierType: null,
	enterpriseNature: null,
	provinceId: null,
	cityId: null,
	address: null,
	telephone: null,
	contacts: null,
	mobilePhone: null,
	email: null,
	registeredCapital: null,
	establishDate: null,
	postalCode: null,
	companyIntroduction: null,
	businessLicenseUrl: null,
	openingPermitUrl: null,
	confidentialityCommitmentUrl: null,
	fromType: null,
	biddingId: null,
	legalPerson: null,
	channelLeader: null,
	leadingPhone: null,
	linePhone: null,
	agencyService: null,
	cooperationMode: null,
	businessModel: null,
	companyType: null,
	channelType: null,
	channelLabel: null,
	settlementCycle: null,
	taxRate: null,
	subAccount: null,
	accountConditions: null,
	// asset
	isHolding: null,
	actualController: null,
	registeredAddress: null,
	actualOfficeAddress: null,
	actualCapital: null,
	bidderPerson: null,
	bidderPhone: null,
	bidSection: null,
	tenderSubmitTime: null,
	automobileBusinessTime: null,
	carTransactionVolume: null,
	headquarters: null,
	category: null,
	isIllegal: null,
	isFinancialEmbroilment: null,
	enterpriseProject: null,
	handleBusiness: null,
}

export function getUrls(urlDatas: any) {
	const zbUrlDatas = urlDatas?.biddingDocumentUrl?.split(',') || []
	const urls = [
		urlDatas?.biddingNoticeUrl,
		urlDatas?.changeNoticeUrl,
		urlDatas?.delayNoticeUrl,
		urlDatas?.comprehensiveScoringUrl,
		urlDatas?.bidWinningDocumentUrl,
		urlDatas?.bidEvaluationReport,
		urlDatas?.bidWinningNoticeUrl,
		urlDatas?.bidWinningCandidatesUrl,
		urlDatas?.bidWinningResultUrl,
		urlDatas?.biddingOtherUrl1, // 公告其他文件
		urlDatas?.biddingOtherUrl2,
		urlDatas?.biddingOtherUrl3,
		urlDatas?.bidEvaluationUrl1, // 评标其他文件
		urlDatas?.bidEvaluationUrl2,
		urlDatas?.bidEvaluationUrl3,
		urlDatas?.bidWinningOtherUrl1, // 中标其他文件
		urlDatas?.bidWinningOtherUrl2,
		urlDatas?.bidWinningOtherUrl3,
		...zbUrlDatas,
	]?.map(Number)

	return urls
}
/** 组合所有上传字段 */
export function getUrlData(urlDatas: any) {
	const newUrlData = {
		biddingNoticeUrl: urlDatas?.biddingNoticeUrl,
		changeNoticeUrl: urlDatas?.changeNoticeUrl,
		delayNoticeUrl: urlDatas?.delayNoticeUrl,
		comprehensiveScoringUrl: urlDatas?.comprehensiveScoringUrl,
		bidWinningDocumentUrl: urlDatas?.bidWinningDocumentUrl,
		bidEvaluationReport: urlDatas?.bidEvaluationReport,
		bidWinningNoticeUrl: urlDatas?.bidWinningNoticeUrl,
		bidWinningCandidatesUrl: urlDatas?.bidWinningCandidatesUrl,
		bidWinningResultUrl: urlDatas?.bidWinningResultUrl,
		biddingOtherUrl1: urlDatas?.biddingOtherUrl1, // 公告其他文件
		biddingOtherUrl2: urlDatas?.biddingOtherUrl2,
		biddingOtherUrl3: urlDatas?.biddingOtherUrl3,
		bidEvaluationUrl1: urlDatas?.bidEvaluationUrl1, // 评标其他文件
		bidEvaluationUrl2: urlDatas?.bidEvaluationUrl2,
		bidEvaluationUrl3: urlDatas?.bidEvaluationUrl3,
		bidWinningOtherUrl1: urlDatas?.bidWinningOtherUrl1, // 中标其他文件
		bidWinningOtherUrl2: urlDatas?.bidWinningOtherUrl2,
		bidWinningOtherUrl3: urlDatas?.bidWinningOtherUrl3,
	}

	return newUrlData
}
